//package com.xucy.springboot.shiro;
//
//import org.apache.shiro.authc.AuthenticationInfo;
//import org.apache.shiro.authc.AuthenticationToken;
//import org.apache.shiro.authc.UsernamePasswordToken;
//import org.apache.shiro.authc.credential.SimpleCredentialsMatcher;
//
///**
// * @Author xucy
// * @Date 2019-09-01 17:55
// * @Description
// **/
//
//public class CredentialMatcher extends SimpleCredentialsMatcher {
//
//    //密码校验规则重写
//    @Override
//    public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) {
//        UsernamePasswordToken usernamePasswordToken= (UsernamePasswordToken) token;
//        String password=new String(usernamePasswordToken.getPassword());
//
//        String dbPassword=info.getCredentials()+"";
//
//        return this.equals(password,dbPassword);
//    }
//}
